/**
 * Created by 游永年 on 2019-01-20 15:42.
 * 购买step四个过程
 */
'use strict'
import React, {Component} from 'react';
import {connect} from 'dva';
// import {Steps} from "antd-mobile";
import Full from "../../../components/layout/Full";
import BookOne from "./BookOne";
import BookFour from "./BookFour";
import BookThree from "./BookThree";
import BookTwo from "./BookTwo";

// const Step = Steps.Step;

class MySteps extends Component {
  render() {
    // const {step} = this.props;

    return (
      <Full>
        {/*<Steps current={step} direction="horizontal" size="small">*/}
          {/*<Step title="预约详情"/>*/}
          {/*<Step title="上课时间"/>*/}
          {/*<Step title="课表详情"/>*/}
          {/*<Step title="订单详情"/>*/}
        {/*</Steps>*/}
        {this.renderCurrent()}
      </Full>
    );
  }

  renderCurrent = _ => {
    const {step} = this.props;
    switch (step) {
      case 0:
        return <BookOne/>;
      case 1:
        return <BookTwo/>;
      case 2:
        return <BookThree/>;
      case 3:
        return <BookFour/>;
      default:
        return '页面出错';
    }
  }
}

MySteps.propTypes = {};
const opts = ({product}) => {
  const {step = 0} = product || {};
  return {step};
};
export default connect(opts)(MySteps);
